package top.zhangjianyong.tools.factory;

import top.zhangjianyong.tools.entity.BillFile;

import java.io.File;

/**
 * @author ： zhangjianyong
 * @date ： 2022/7/17 1:00 PM
 */
public class BillFileFactory {

    public static BillFile create() {
        return new BillFile();
    }

    public static BillFile create(File file, String filePath) {
        BillFile billFile = create();
        String path = file.getPath().replace(filePath, "");
        billFile.setName(file.getName());
        billFile.setPath(path);

        billFile.setState("初始");
        return billFile;
    }
}
